<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>实名认证</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />


</head>

<body>
    <header class="aui-bar aui-bar-nav aui-bar-light" id="header">
        <a class="aui-pull-left aui-btn" tapmode onclick="api.closeWin();">
            <span class="aui-iconfont aui-icon-left" style="color:#FF4285"></span>
        </a>
        <div class="aui-title" style="color:#FF4285">实名认证</div>

    </header>
    <input type="hidden" id="name-1">
      <input type="hidden" id="number-1">
    <footer class="aui-bar aui-bar-tab" id="footer" style="background:#FF4285;color:#fff;line-height:55px;" onclick="fnSubmitRealName()">
        <div>点击实名认证</div>
    </footer>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="./conf/config.js"></script>
<script type="text/javascript" src="./js/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
    apiready = function() {
      var jsfun = 'funcGoto();';
      api.execScript({
          frameName: 'real_name_frame',
          script: jsfun
      });
        initEventListenner(); //退出键添加提示框

        var header = $api.byId('header');
        $api.fixStatusBar($api.dom('header'));
        api.setStatusBarStyle({
            style: 'dark',
           color:'transparent'
        });
        var headerH = $api.offset(header).h;
        var footer = $api.byId('footer');
        var footerH = $api.offset(footer).h;
        api.openFrame({
            name: 'real_name_frame',
            url: './real_name_frame.html',
            rect: {
                x: 0,
                y: headerH,
                w: 'auto',
                h: api.winHeight - footerH - headerH,
            },
            pageParam: {
                wareId: api.pageParam.wareId
            },
            bounces: true
        });

    };
function funcGoto(){
  alert($("#name").val());
}

    function initEventListenner() {

        api.addEventListener({
            name: 'keyback'
        }, function(ret, err) {
          api.closeWin();
            // api.confirm({
            //     title: '提示',
            //     msg: '是否退出应用',
            //     buttons: ['确定', '取消']
            // }, function(ret, err) {
            //     if (ret.buttonIndex == 1) {
            //         api.closeWidget({
            //             silent: true
            //         });
            //     }
            // });
        });
        // api.addEventListener({
        //     name: 'realName'
        // }, function(ret, err) {
        //         $("#name-1").val(ret.name);
        //         $("#number-1").val(ret.number);
        //
        // })

    };
    //
    function fnSubmitRealName(){
      var SubmitVal = 'fnSubmitRealNameVal();';
        api.execScript({
            frameName: 'real_name_frame',
            script: SubmitVal
        });
    }
</script>

</html>
